package com.example.oldkingdom.base;

public class worldPoint 
{
	public static worldPoint West = new worldPoint(-1,0);
	public static worldPoint East = new worldPoint(1,0);
	public static worldPoint North = new worldPoint(0,-1);
	public static worldPoint South = new worldPoint(0,1);
	public worldPoint(int x, int y)
	{
		_x = x;
		_y = y;
	}
	public worldPoint()
	{
		
	}
	public void setX(int x)
	{
		_x = x;
	}
	public void setY(int y)
	{
		_y = y;
	}
	
	public int getX()
	{
		return _x;
	}
	public int getY()
	{
		return _y;
	}
	public int getHash()
	{
		return _x *10000 + _y;
	}
	public worldPoint plus(worldPoint wp)
	{
		 return new worldPoint(_x + wp.getX(), _y + wp.getY());
	}
	private int _x = 0;
	private int _y = 0;

}
